home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!cs.utexas.edu!convex!texsun!cronkite!exodus!Pa.dec.com!dbs
- From: dbs@Pa.dec.com
- Newsgroups: comp.sources.x
- Subject: v13i073: xboard, Patch1, Part01/01
- Message-ID: <16336@exodus.Eng.Sun.COM>
- Date: 6 Jul 91 07:06:56 GMT
- References: <csx-13i073-xboard@uunet.UU.NET>
- Sender: news@exodus.Eng.Sun.COM
- Lines: 308
- Approved: argv@sun.com
-
- Submitted-by: dbs@Pa.dec.com
- Posting-number: Volume 13, Issue 73
- Archive-name: xboard/patch1
- Patch-To: xboard: Volume 13, Issue 57-62
-
- Here is a minor patch to xboard 1.2. Here is a list of the fixes:
-
- Minor fixes to the 1.2 release
-
- - Multiple uses of the get positition file button got confused
- on the second click.
-
- - Long game file comments cause core dumps on HP systems.
-
- - Parsed comments as [ ..............text follows ] into d7d5
-
- - New-line wasn't always being added to forward move strings sent to gnuchess.
-
- - Put easy back into the initString. This DISABLES easy mode which by
- default is ON.
-
- - Can't do a backward move when it isn't your turn because gnuchess
- gets confused. Similar bug for forward move. Do a bunch of moves,
- back up move and go forward. These get filtered out now.
-
- The version of xboard on export.lcs.mit.edu (18.30.0.238) has been updated
- to include this patch.
-
- --Chris
-
- diff -c rev5/Imakefile rev6/Imakefile
- *** rev5/Imakefile Fri Jun 7 10:53:04 1991
- --- rev6/Imakefile Mon Jun 24 16:47:41 1991
- ***************
- *** 17,22 ****
- depend:: parser.c
-
- clean::
- ! $(RM) parser.c
-
- ComplexProgramTarget(xboard)
- --- 17,22 ----
- depend:: parser.c
-
- clean::
- ! $(RM) parser.c chess.lst
-
- ComplexProgramTarget(xboard)
- diff -c rev5/README rev6/README
- *** rev5/README Wed Jun 12 14:07:33 1991
- --- rev6/README Wed Jun 26 14:30:42 1991
- ***************
- *** 39,45 ****
-
- CAVEATS
-
- ! XBoard depends on the R4 Xt Intrinsics and R4 Athena Widget Set. R3 won't do.
- XBoard works best with the version 3.1+ of gnuchess. There has been one patch
- and it is necessary. This release of gnuchess was dated: Mon Apr 15 10:20 1991
- by Mike McGann and should be available from comp.sources.misc archives.
- --- 39,49 ----
-
- CAVEATS
-
- ! XBoard depends on the R4 Xt Intrinsics and R4 Athena Widget Set. In particular,
- ! R3 just won't do. XBoard uses R4 features. The standard DEC and SUN releases
- ! won't do either. The Athena widgets are either missing in the DEC standard
- ! distribution or in the wrong (R3) place in SUN OpenWindows.
- !
- XBoard works best with the version 3.1+ of gnuchess. There has been one patch
- and it is necessary. This release of gnuchess was dated: Mon Apr 15 10:20 1991
- by Mike McGann and should be available from comp.sources.misc archives.
- ***************
- *** 227,235 ****
- - Changed the protocol that xboard uses to work with the new version of
- gnuchessr.
-
- - - Turned off the easy mode.
- -
- - For version 1.2, Jeff Kenton, Richard LLoyd, David Jensen, Martin D.,
- Bill Schmidt, Scott Hemphill, Paul Vaughan and Bill Shauck all found
- a lot of bugs that we put into xboard just to see if they were paying
- attention. They were.
- --- 231,257 ----
- - Changed the protocol that xboard uses to work with the new version of
- gnuchessr.
-
- - For version 1.2, Jeff Kenton, Richard LLoyd, David Jensen, Martin D.,
- Bill Schmidt, Scott Hemphill, Paul Vaughan and Bill Shauck all found
- a lot of bugs that we put into xboard just to see if they were paying
- attention. They were.
- +
- + Thu Jun 20 15:04:06 PDT 1991
- +
- + Minor fixes to the 1.2 release
- +
- + - Multiple uses of the get positition file button got confused
- + on the second click.
- +
- + - Long game file comments cause core dumps on HP systems.
- +
- + - Parsed comments as [ ..............text follows ] into d7d5
- +
- + - New-line wasn't always being added to forward move strings sent to gnuchess.
- +
- + - Put easy back into the initString. This DISABLES easy mode which by
- + default is ON.
- +
- + - Can't do a backward move when it isn't your turn because gnuchess
- + gets confused. Similar bug for forward move. Do a bunch of moves,
- + back up move and go forward. These get filtered out now.
- Common subdirectories: rev5/bitmaps and rev6/bitmaps
- diff -c rev5/parser.l rev6/parser.l
- *** rev5/parser.l Tue Jun 11 16:59:17 1991
- --- rev6/parser.l Fri Jun 14 14:03:35 1991
- ***************
- *** 37,42 ****
- --- 37,44 ----
-
- #define A_I(ch) (tolower(ch) - 'a')
- #define NO_CONSTRAINT -1
- + #undef YYLMAX
- + #define YYLMAX 2048
- #undef input
-
- #define KING_TEST(r, f, piece) { \
- diff -c rev5/patchlevel.h rev6/patchlevel.h
- *** rev5/patchlevel.h Fri May 17 15:37:36 1991
- --- rev6/patchlevel.h Thu Jun 20 15:02:30 1991
- ***************
- *** 1 ****
- ! #define PATCHLEVEL 4
- --- 1 ----
- ! #define PATCHLEVEL 5
- diff -c rev5/xboard.c rev6/xboard.c
- *** rev5/xboard.c Wed Jun 12 11:02:16 1991
- --- rev6/xboard.c Wed Jun 26 11:09:54 1991
- ***************
- *** 1361,1371 ****
-
- move_type = (ChessMove) yylex();
-
- ! if (xboardDebug)
- if (move_type == BadMove)
- ! fprintf(stderr, "BadMove parsing %s\n", yytext);
- else
- fprintf(stderr, "Parsed %s into %s", yytext, currentMoveString);
-
- switch (move_type) {
- case Comment:
- --- 1361,1377 ----
-
- move_type = (ChessMove) yylex();
-
- ! if (xboardDebug) {
- if (move_type == BadMove)
- ! fprintf(stderr, "Parsed BadMove: %s\n", yytext);
- ! else if (move_type == Comment)
- ! fprintf(stderr, "Parsed Comment: %s\n", yytext);
- ! else if ((move_type == WhiteWins) || (move_type == BlackWins)
- ! || (move_type == GameIsDrawn) || (move_type == StartGame))
- ! fprintf(stderr, "Parsed EndOfGame: %s\n", yytext);
- else
- fprintf(stderr, "Parsed %s into %s", yytext, currentMoveString);
- + }
-
- switch (move_type) {
- case Comment:
- ***************
- *** 1415,1421 ****
- strcpy(parseList[currentMove], "0-1");
- case GameIsDrawn:
- if (move_type == GameIsDrawn)
- ! strcpy(parseList[currentMove], "1/2");
- CopyBoard(boards[currentMove + 1], boards[currentMove]);
- forwardMostMove = currentMove++;
- default:
- --- 1421,1427 ----
- strcpy(parseList[currentMove], "0-1");
- case GameIsDrawn:
- if (move_type == GameIsDrawn)
- ! strcpy(parseList[currentMove], "1/2-1/2");
- CopyBoard(boards[currentMove + 1], boards[currentMove]);
- forwardMostMove = currentMove++;
- default:
- ***************
- *** 1979,1984 ****
- --- 1985,1992 ----
- strcpy(error_buf, buf);
- sprintf(buf, "Can't open %s", error_buf);
- DisplayMessage(buf);
- + XtFree(appData.readGameFile);
- + appData.readGameFile = NULL;
- return (int) False;
- }
-
- ***************
- *** 2045,2051 ****
- }
-
- if ((gameMode == EndOfGame) || (matchMode != MatchFalse)
- ! || ((currentMove == 0) && (forwardMostMove == 0)))
- return;
-
- if (gameMode != PauseGame) {
- --- 2053,2060 ----
- }
-
- if ((gameMode == EndOfGame) || (matchMode != MatchFalse)
- ! || ((currentMove == 0) && (forwardMostMove == 0))
- ! || (currentMove >= forwardMostMove))
- return;
-
- if (gameMode != PauseGame) {
- ***************
- *** 2060,2066 ****
- ReadGameFileProc();
- if ((strcmp(parseList[currentMove], "1-0") == 0)
- || (strcmp(parseList[currentMove], "0-1") == 0)
- ! || (strcmp(parseList[currentMove], "1/2") == 0)
- || (strcmp(parseList[currentMove], "End Of Game") == 0))
- DisplayMessage(parseList[currentMove]);
- return;
- --- 2069,2075 ----
- ReadGameFileProc();
- if ((strcmp(parseList[currentMove], "1-0") == 0)
- || (strcmp(parseList[currentMove], "0-1") == 0)
- ! || (strcmp(parseList[currentMove], "1/2-1/2") == 0)
- || (strcmp(parseList[currentMove], "End Of Game") == 0))
- DisplayMessage(parseList[currentMove]);
- return;
- ***************
- *** 2147,2152 ****
- --- 2156,2163 ----
- strcpy(line, buf);
- sprintf(buf, "Can't open %s", line);
- DisplayMessage(buf);
- + XtFree(appData.readPositionFile);
- + appData.readPositionFile = NULL;
- return (int) False;
- }
-
- ***************
- *** 2211,2216 ****
- --- 2222,2233 ----
- return;
- }
-
- + if ((WHITE_ON_MOVE && gameMode == MachinePlaysWhite)
- + || (!WHITE_ON_MOVE && gameMode == MachinePlaysBlack)) {
- + DisplayMessage("Wait until your turn");
- + return;
- + }
- +
- if (gameMode == BeginningOfGame)
- gameMode = lastGameMode;
- else
- ***************
- *** 2591,2599 ****
- FILE *fp;
- {
- if (xboardDebug)
- ! fprintf(stderr, "Sending to %s: %s",
- fp == toFirstProgFP ? "first" : "second", message);
- ! fputs(message, fp);
- }
-
- void
- --- 2608,2620 ----
- FILE *fp;
- {
- if (xboardDebug)
- ! fprintf(stderr, "Sending to %s: %s\n",
- fp == toFirstProgFP ? "first" : "second", message);
- !
- ! if (message[strlen(message) - 1] != '\n')
- ! fprintf(fp, "\n%s\n", message);
- ! else
- ! fputs(message, fp);
- }
-
- void
- diff -c rev5/xboard.h rev6/xboard.h
- *** rev5/xboard.h Wed Jun 12 13:35:17 1991
- --- rev6/xboard.h Thu Jun 20 15:45:29 1991
- ***************
- *** 42,48 ****
- #define FIRST_HOST "localhost"
- #define SECOND_HOST "localhost"
- #define MATCH_MODE "False"
- ! #define INIT_STRING "new\nbeep\nrandom\n"
- #define WHITE_STRING "white\ngo\n"
- #define BLACK_STRING "black\ngo\n"
- #define WHITE_PIECE_COLOR "#FFFFCC"
- --- 42,48 ----
- #define FIRST_HOST "localhost"
- #define SECOND_HOST "localhost"
- #define MATCH_MODE "False"
- ! #define INIT_STRING "new\nbeep\nrandom\neasy\n"
- #define WHITE_STRING "white\ngo\n"
- #define BLACK_STRING "black\ngo\n"
- #define WHITE_PIECE_COLOR "#FFFFCC"
-
- --
- Dan Heller
- O'Reilly && Associates Z-Code Software Comp-sources-x:
- Senior Writer President comp-sources-x@uunet.uu.net
- argv@ora.com argv@zipcode.com
-